<template>
  <h3>子组件的 count 为: {{count}}</h3>
  <button @click="add">子组件</button>
</template>

<script>
export default {
  name: 'MyComponent',
  props: ['count'],
  emits: ['update:count'], // 固定事件 update:XXX
  methods: {
    add() {
      this.$emit('update:count', this.count + 1)  // this.count ++ 无法正常显示
    }
  }
}
</script>

<style>

</style>